package cn.edu.dzkd.software.controller;

import cn.edu.dzkd.software.pojo.User01;
import cn.edu.dzkd.software.service.User01Service;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("user01")
public class User01Controller {
    @Resource
    private User01Service user01Service;
    @RequestMapping(value = "/selectUser01s",method = RequestMethod.GET)
    public Map<String,Object> selectUser01s(@RequestParam int page){
        return user01Service.selectUser01s(page);
    }
    @RequestMapping(value = "/update",method = RequestMethod.POST)
    public Map<String,Object> update(@RequestBody User01 user01){
        return user01Service.update(user01);
    }
    @RequestMapping(value = "/delete",method = RequestMethod.POST)
    public Map<String,Object> delete(@RequestParam Integer id){
        return user01Service.delete(id);
    }
}
